<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/newWeb/css/bootstrap.min.css" rel="stylesheet">
        <link href="__PUBLIC__/newWeb/css/font-awesome.css" rel="stylesheet">

        <!-- Data Tables -->
        <link href="__PUBLIC__/newWeb/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

        <link href="__PUBLIC__/newWeb/css/animate.css" rel="stylesheet">
        <link href="__PUBLIC__/newWeb/css/style.css" rel="stylesheet">
        <style type="text/css">
            .form-control,
            .single-line{
                padding-top: 4px ; !important;
            }
        </style>
    </head>
    <body class="gray-bg">
        <div class="row">
            <div class="col-sm-12">
                <div class="wrapper wrapper-content animated fadeInRight">
                    <div class="ibox-title">
                        <h5>医院</h5>
                        <div class="ibox-tools">
                            <a href="{:U('Hospital/hospitalAdd')}">
                            <button class="btn btn-info" type="button" style="margin-top: -8px"><i class="fa fa-paste"></i>新增</button>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>医院名称</th>
                                    <th>地理区域</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <foreach name="hospitalList" item="vo" key="k" >
                                <tr class="gradeX">
                                    <td>{$vo.id}</td>
                                    <td>{$vo.name}</td>
                                    <td>{$vo.province}-{$vo.city}-{$vo.area}</td>
                                    <td class="center">
                                        <a href="{:U('Hospital/hospitalEdit',['id'=>$vo['id']])}">
                                            <button class="btn btn-info btnEdit" type="button"><i class="fa fa-paste"></i> 编辑</button>
                                        </a>
                                        <a href="{:U('Hospital/hospitalDelete',['id'=>$vo['id']])}">
                                            <button class="btn btn-danger btnDel" type="button"><i class="fa fa-paste"></i> 删除</button>
                                        </a>
                                    </td>
                                </tr>
                            </foreach>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <!-- 全局js -->
    <script src="__PUBLIC__/newWeb/js/jquery.min.js"></script>
    <script src="__PUBLIC__/newWeb/js/bootstrap.min.js"></script>



    <script src="__PUBLIC__/newWeb/js/plugins/jeditable/jquery.jeditable.js"></script>

    <!-- Data Tables -->
    <script src="__PUBLIC__/newWeb/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="__PUBLIC__/newWeb/js/plugins/dataTables/dataTables.bootstrap.js"></script>

    <!-- 自定义js -->
    <script src="__PUBLIC__/newWeb/js/content.js"></script>


    <!-- Page-Level Scripts -->
    <script>
        $(document).ready(function () {
            $('.dataTables-example').dataTable();

            /* Init DataTables */
            var oTable = $('#editable').dataTable();

            /* Apply the jEditable handlers to the table */
            /*oTable.$('td').editable('../example_ajax.php', {
                "callback": function (sValue, y) {
                    var aPos = oTable.fnGetPosition(this);
                    oTable.fnUpdate(sValue, aPos[0], aPos[1]);
                },
                "submitdata": function (value, settings) {
                    return {
                        "row_id": this.parentNode.getAttribute('id'),
                        "column": oTable.fnGetPosition(this)[2]
                    };
                },

                "width": "90%",
                "height": "100%"
            });*/


        });

        /*function fnClickAddRow() {
            $('#editable').dataTable().fnAddData([
                "Custom row",
                "New row",
                "New row",
                "New row",
                "New row"]);

        }*/
    </script>
    </body>
    
</html>
